package com.zenithmind.common.constant;

/**
 * RocketMQ常量类
 * 定义所有与RocketMQ相关的常量，包括主题、标签等
 */
public class MQConstants {
    
    /**
     * 聊天消息相关主题和标签
     */
    public static class Chat {
        // 聊天消息主题
        public static final String TOPIC = "TOPIC_CHAT";
        
        // 私聊消息标签
        public static final String TAG_PRIVATE_MSG = "TAG_PRIVATE_MSG";
        
        // 群聊消息标签
        public static final String TAG_GROUP_MSG = "TAG_GROUP_MSG";
        
        // 系统通知标签
        public static final String TAG_SYSTEM_NOTICE = "TAG_SYSTEM_NOTICE";
        
        // 消息已读标签
        public static final String TAG_MSG_READ = "TAG_MSG_READ";
        
        // 消息撤回标签
        public static final String TAG_MSG_RECALL = "TAG_MSG_RECALL";
    }
    
    /**
     * 好友关系相关主题和标签
     */
    public static class Friend {
        // 好友操作主题
        public static final String TOPIC = "TOPIC_FRIEND";
        
        // 好友请求标签
        public static final String TAG_FRIEND_REQUEST = "TAG_FRIEND_REQUEST";
        
        // 好友接受标签
        public static final String TAG_FRIEND_ACCEPT = "TAG_FRIEND_ACCEPT";
        
        // 好友拒绝标签
        public static final String TAG_FRIEND_REJECT = "TAG_FRIEND_REJECT";
        
        // 好友删除标签
        public static final String TAG_FRIEND_DELETE = "TAG_FRIEND_DELETE";
    }
    
    /**
     * 群组相关主题和标签
     */
    public static class Group {
        // 群组操作主题
        public static final String TOPIC = "TOPIC_GROUP";
        
        // 创建群组标签
        public static final String TAG_GROUP_CREATE = "TAG_GROUP_CREATE";
        
        // 解散群组标签
        public static final String TAG_GROUP_DISMISS = "TAG_GROUP_DISMISS";
        
        // 加入群组标签
        public static final String TAG_GROUP_JOIN = "TAG_GROUP_JOIN";
        
        // 退出群组标签
        public static final String TAG_GROUP_EXIT = "TAG_GROUP_EXIT";
        
        // 群组成员变动标签
        public static final String TAG_GROUP_MEMBER_CHANGE = "TAG_GROUP_MEMBER_CHANGE";
    }
    
    /**
     * 消息延迟级别
     * RocketMQ支持预设的延迟级别：1s, 5s, 10s, 30s, 1m, 2m, 3m, 4m, 5m, 6m, 7m, 8m, 9m, 10m, 20m, 30m, 1h, 2h
     */
    public static class DelayLevel {
        public static final int LEVEL_1 = 1;    // 1s
        public static final int LEVEL_2 = 2;    // 5s
        public static final int LEVEL_3 = 3;    // 10s
        public static final int LEVEL_4 = 4;    // 30s
        public static final int LEVEL_5 = 5;    // 1m
        public static final int LEVEL_6 = 6;    // 2m
        public static final int LEVEL_10 = 10;  // 6m
        public static final int LEVEL_15 = 15;  // 30m
        public static final int LEVEL_18 = 18;  // 2h
    }
} 